package com.example.logger.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoggerController {
    private static final Logger logger = LoggerFactory.getLogger(LoggerController.class);

    @RequestMapping("/getLogger")
    public String getLogger() {
        logger.trace("我是 trace");
        logger.debug("我是 deBug");
        logger.info("我是 info");
        logger.warn("我是 warn");
        logger.error("我是 error");

        return "hello logger";
    }
}
